# student = [["张三", "18", "功能测试"], ["李四", "20", "自动化测试"], ["王五", "22",["python", "java"]]]
#
# print(student[0])
# aa = student[0]
# print(aa[1])
# print(student[0][1])
# print(student[1][0])
# print(student[2][2][1])




# 嵌套应用案例2
# 列表的嵌套：列表中的元素还是列表
# 登录页面为例
# 需求：分别使用不同的数据（包括手机号、密码、验证码）进行登录验证
# 结果：账号或密码错误；验证码错误；登录成功
# 定义非空列表(把每种测试结果的数据放在一起)
data = [
    ["13488888888", "123456", "8888"],
    ["13488888888", "666666", "8888"],
    ["13488888880", "123456", "8888"],
    ["13488888888", "123456", "0000"]
]
# 遍历
for i in data:
# print(i) # 每一个中括号的数据 ，i = ["13488888888", "123456", "8888"]
# 判断手机号和密码
    if i[0] == "13488888888" and i[1] == "123456":
# 判断验证码
      if i[2] == "8888":
        print("登录成功")
      else:
        print("验证码错误")
    else:
      print("用户名或密码错误")